import task from './county/task'
import program from './city/program'
// import data from './city/data'
import goods from './city/goods'
import org from './province/org'
import settle from './city/settle'
import report from './city/report'
// import analy from './city/analy'
// import insur from './city/insur'
import customer from './city/customer'
import risk from './city/risk'
import manage from './city/manage'
import archives from './city/archives'

export default {
  path: '/',
  component: () => import(/* webpackChunkName: "credit-app" */ '@/credit/views/city/Layout.vue'),
  meta: {
    root: true,
    title: '农业大数据信用服务平台',
    excludeJob: ['org_credit_super'],
    // job: ['org_corp', 'org_credit'],
    org: ['org_credit'],
    regionLevel: 2, // 行政级别限制
  },
  children: [
    {
      path: '',
      redirect: 'credit',
    },
    // {
    //   path: 'index',
    //   component: () => import(/* webpackChunkName: "credit-app" */ '@/credit/views/Index.vue'),
    //   meta: { title: '主页', icon: 'fa fa-fw fa-home' }
    // },
    {
      path: 'credit',
      component: { render: h => h('router-view') },
      meta: { title: '信用服务', icon: 'fa fa-fw fa-home', hidden: true },
      children: [
        {
          path: '',
          redirect: 'index',
        },
        {
          path: 'index',
          component: () =>
            import(/* webpackChunkName: "credit-index" */ '@/credit/views/city/index/Index.vue'),
          meta: { title: '主页', icon: 'fa fa-fw fa-home', excludeJob: ['org_c_emp'] },
        },
        {
          path: 'index',
          component: () =>
            import(
              /* webpackChunkName: "credit-resIndex" */ '@/credit/views/city/bus/index/Index.vue'
            ),
          meta: { title: '主页', icon: 'fa fa-fw fa-home', job: ['org_c_emp'] },
        },
        {
          path: 'grade',
          component: () =>
            import(/* webpackChunkName: "credit-customer" */ '@/credit/views/city/grade/Index.vue'),
          meta: { title: '机构评级', icon: 'fa fa-fw fa-user-o' },
        },
        {
          path: 'customer',
          component: () =>
            import(/* webpackChunkName: "credit-customer" */ '@/components/AliveView.vue'),
          meta: { title: '机构评级', icon: 'fa fa-fw fa-cubes' },
          children: customer,
        },
        {
          path: 'program',
          component: () =>
            import(/* webpackChunkName: "credit-city-program" */ '@/components/AliveView.vue'),
          meta: { title: '项目管理', icon: 'fa fa-fw fa-list' },
          children: program,
        },

        {
          path: 'task',
          component: { render: h => h('router-view') },
          meta: { title: '业务管理', icon: 'fa fa-fw fa-newspaper-o' },
          children: task,
        },
        {
          path: 'risk',
          component: () =>
            import(/* webpackChunkName: "credit-report" */ '@/components/AliveView.vue'),
          meta: { title: '风险管理', icon: 'fa fa-fw fa-shield' },
          children: risk,
        },
        {
          path: 'settle',
          component: () =>
            import(/* webpackChunkName: "credit-settle" */ '@/components/AliveView.vue'),
          meta: { title: '结算管理', icon: 'fa fa-fw fa-wpforms' },
          children: settle,
        },
        {
          path: 'manage',
          component: () =>
            import(/* webpackChunkName: "credit-mange" */ '@/components/AliveView.vue'),
          meta: { title: '内部管理', icon: 'fa fa-fw fa-sitemap' },
          children: manage,
        },
        {
          path: 'archives',
          component: () =>
            import(/* webpackChunkName: "credit-archives" */ '@/components/AliveView.vue'),
          meta: { title: '档案管理', icon: 'fa fa-fw fa-file-pdf-o' },
          children: archives,
        },
        {
          path: 'goods',
          component: () =>
            import(/* webpackChunkName: "credit-goods" */ '@/components/AliveView.vue'),
          meta: { title: '产品管理', icon: 'fa fa-fw fa-file-archive-o' },
          children: goods,
        },
        {
          path: 'org',
          component: () =>
            import(/* webpackChunkName: "credit-org" */ '@/components/AliveView.vue'),
          meta: { title: '合作机构', icon: 'fa fa-fw fa-address-card-o' },
          children: org,
        },

        {
          path: 'report',
          component: () =>
            import(/* webpackChunkName: "credit-report" */ '@/components/AliveView.vue'),
          meta: { title: '台账报表', icon: 'fa fa-fw fa-file-text-o' },
          children: report,
        },
        // {
        //   path: 'data',
        //   component: () => import(/* webpackChunkName: "credit-data" */ '@/components/AliveView.vue'),
        //   meta: { title: '数据管理', icon: 'fa fa-fw fa-database' },
        //   children: data
        // },
        // {
        //   path: 'analy',
        //   component: () => import(/* webpackChunkName: "credit-analy" */ '@/components/AliveView.vue'),
        //   meta: { title: '农业大数据', icon: 'fa fa-fw fa-bar-chart' },
        //   children: analy
        // },
        // {
        //   path: 'insur',
        //   component: () => import(/* webpackChunkName: "credit-insur" */ '@/components/AliveView.vue'),
        //   meta: { title: '涉农保险', icon: 'fa fa-fw fa-archive' },
        //   children: insur
        // },
        {
          path: 'flow',
          component: () =>
            import(/* webpackChunkName: "credit-flow" */ '@/credit/views/county/flow/Index.vue'),
          meta: { title: '流程管理', hidden: true },
        },
      ],
    },
    // {
    //   path: 'icon',
    //   component: () => import(/* webpackChunkName: "app-icon" */ '@/common/views/Icons.vue'),
    //   meta: { title: '图标', icon: 'fa fa-map-marker', hidden: true }
    // }
  ],
}
